using UnityEngine;

public class TrajectorySkillDeployer : SkillDeployer
{
    protected override void Awake()
    {
        base.Awake();
    }

    protected override void Start()
    {
        base.Start();

        rb.velocity = owner.facingDir * skillData.moveDirection * skillData.lunachForce;
    }

    protected override void Update()
    {
        base.Update();

        if (skillData.disappearType.Contains(DisappearType.TimeOver))
        {
            if (skillTimer <= 0)
                Destroy(this.gameObject);
        }

        if (skillData.disappearType.Contains(DisappearType.MoveOver))
        {
            if (Vector3.Distance(startPos, transform.position) > skillData.moveDistance)
                Destroy(this.gameObject);
        }
    }

    protected override void OnTriggerEnter2D(Collider2D collision)
    {
        base.OnTriggerEnter2D(collision);
    }
}
